package poly;

interface Studyable{
	// 抽象方法
	void study(String thing);
}
class Student implements Studyable{
	@Override
	public void study(String thing) {
		System.out.println("学生在学校学习" + thing);
	}
}
class Teacher implements Studyable{
	@Override
	public void study(String thing) {
		System.out.println("老师去进修" + thing);
	}
}
class Cook implements Studyable{
	@Override
	public void study(String thing) {
		System.out.println("厨师去新东方学习" + thing);
	}
}

public class PolyDemo {
	public static void main(String[] args) {
		Studyable s = new Student();
		s.study("数学");
		
		s = new Teacher();
		s.study("法律");
		
		s = new Cook();
		s.study("颠勺");
	}
}
